/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package elaborate.tag_analysis.client.applications.delicious;

import elaborate.tag_analysis.client.applications.ApplicationContext;
import elaborate.tag_analysis.client.applications.AbstractApplication;
import elaborate.tag_analysis.client.applications.ResourceHandler;
import elaborate.tag_analysis.client.applications.delicious.ui.MainControlPanel;
import java.awt.Component;

/**
 *
 * @author lendle
 */
public class DeliciousApplication extends AbstractApplication {
    private MainControlPanel ui = null;
    private DeliciousResourceHandler resourceHandler = null;

    @Override
    public void init(ApplicationContext context) {
        super.init(context);
        this.ui=new MainControlPanel();
        this.ui.setContext(context);
        
        resourceHandler = new DeliciousResourceHandler(resourceLogs, this.daoFactory);
    }

    @Override
    public Component getMainView() {
        return this.ui;
    }

    @Override
    public void requestTags4Resource(String resourceIdentifier) {
        this.ui.extractTags(resourceIdentifier);
    }

    @Override
    public ResourceHandler getResourceHandler() {
        return this.resourceHandler;
    }

    @Override
    public String getApplicationId() {
        return "delicious";
    }

    @Override
    public void activated() {
        this.ui = new MainControlPanel();
        this.ui.setContext(this.context);
    }
}
